<?php
namespace tp5_lib\alipay\model;

use think\Model;

class AlipayUserModel extends Model
{
    protected $table="alipay_user";
    public function install()
    {
        $table=$this->db()->getTable();
        $sql="CREATE TABLE IF NOT EXISTS `$table` (
            `id` int(11) NOT NULL PRIMARY KEY AUTO_INCREMENT,
            `user_id` int(11) NOT NULL,
            `alipay_user_id` varchar(20) NOT NULL,
            `gender` varchar(2) NOT NULL,
            `is_certified` varchar(2) NOT NULL,
            `is_student_certified` varchar(2) NOT NULL,
            `user_status` varchar(2) NOT NULL,
            `user_type` int(11) NOT NULL
        ) ENGINE=InnoDB DEFAULT CHARSET=utf8;";
        $this->db()->execute($sql);
    }
}
